<template>
  <el-pagination
    background
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :current-page="currentpage"
    :page-sizes="pagesizes"
    :page-size="pagesize"
    layout="total, sizes, prev, pager, next, jumper"
    :total="total"
  ></el-pagination>
</template>

<script>
export default {
  name: "mypagenation",
  props: ["total", "currentpage", "pagesize", "pagesizes"],
  methods: {
    handleSizeChange(newSize) {
      this.$emit("sizeChange", newSize);
    },
    handleCurrentChange(newPage) {
      this.$emit("pageChange", newPage);
    },
  },
};
</script>